package com.taikang.hmp.hbusiness.doctor.mss.action;

import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.taikang.hmp.frame.common.TKException;
import com.taikang.hmp.frame.common.datastructre.Dto;
import com.taikang.hmp.frame.common.datastructre.support.BaseDto;
import com.taikang.hmp.frame.common.datastructre.support.ResponseDto;
import com.taikang.hmp.frame.common.web.action.BaseAction;
import com.taikang.hmp.hbusiness.doctor.mss.service.IMSSService;

/** 
 * mss
 * author:qrp
 * time:2015年11月20日 下午6:14:13
 */
public class MssAction extends BaseAction{
	private static final long serialVersionUID = 1L;
	private static Logger logger = LoggerFactory.getLogger(MssAction.class);
	
	
	private IMSSService mssService;
	
	public IMSSService getMssService() {
		return mssService;
	}


	public void setMssService(IMSSService mssService) {
		this.mssService = mssService;
	}


	public String executeAction() {
       if ("getRegisterCustomer".equals(requestDto.getMethod())) {
			logger.info("--【获取注册基本信息】: method getRegisterCustomer --");
			return getRegisterCustomer();
		}else {
			throw new TKException("no support method:"+requestDto.getMethod());
		}
	}
	
	
	
	/**
	 * 获取注册用户列表
	 * @return
	 */
	public String getRegisterCustomer(){
		//通用校验
		ResponseDto responseDto = new ResponseDto();			
		//获取参数
		Dto paramDto = requestDto.getRequestlist().get(0);
		paramDto = super.appendRequestBase(paramDto, requestDto);
		
		
		List<Dto> resultList = mssService.getRegisterCustomer(paramDto);
		
		Dto dto = new BaseDto();
		dto.put("resultlist", resultList);
		responseDto.pushResultDto(dto);
		super.setDataMap(responseDto);
		
		return SUCCESS;
	}
	

}
